﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Views_Admin_class : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Convert.ToString(Session["ssyonghuming"]) == "")
        {
            Response.Redirect("class.aspx");
        }

        if (Convert.ToString(Session["ssmima"]) == "")
        {
            Response.Redirect("class.aspx");
        }
    }

    //这里是 编辑
    protected void Button1_Click(object sender, EventArgs e)
    {
        UpdateDatabase();
    }

    private void UpdateDatabase()
    {

        //替换为您的数据库连接字符串
        string connectionString = "your_connection_string";
        //将 your_table、column_name、new_value 和 condition 替换为您要更新的表、列、新值和条件。
        string query = "UPDATE your_table SET column_name = 'new_value' WHERE condition";


        using (SqlConnection connection = new SqlConnection(connectionString))
        {
            using (SqlCommand command = new SqlCommand(query, connection))
            {
                connection.Open();
                command.ExecuteNonQuery();
            }
        }


    }


    protected void Button2_Click(object sender, EventArgs e)
    {

    }
    protected void Button3_Click(object sender, EventArgs e)
    {

    }

    protected void ManufactList_SelectedIndexChanged(object sender, EventArgs e)
    {
        // 在这里添加您的代码，以处理ManufactList的SelectedIndexChanged事件
    }
}